define(["ajaxBase", "getPath"], function (ajaxBase, getPath) {
    function out() {
        let url = '/login/out',
            data = {},
            method = "POST"
        ajaxBase(data, url, method).then(function (msg) {
            if (msg.statusCode === 1) {
                window.open(getPath.getRootPathWeb() + '/' + 'login', '_self')
            }
        })
    }

    function logout() {
        document.querySelector(".log-out").onclick = function () {
            out()
        }
    }

    return logout
})